<template>
  <div class="app">
    <van-nav-bar
      title="cs-2004"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <router-view></router-view>
    <van-tabbar v-model="active">
      <van-tabbar-item
        icon="home-o"
        to="/home"
      >home</van-tabbar-item>
      <van-tabbar-item
        icon="friends-o"
        to="/friends"
      >friends</van-tabbar-item>
      <van-tabbar-item
        icon="cart-o"
        badge="5"
        to="/cart"
      >标签</van-tabbar-item>
      <van-tabbar-item
        icon="search"
        to="/search"
      >标签</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data: () => ({
    active: 0
  }),
  methods: {
    onClickLeft() {
      console.log('返回上一页')
    }
  }
}
</script>
<style>
</style>
